//
//  Board.h
//  billiards
//
//  Created by Matsumae Kentaro on 12/03/22.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "Box2D.h"
#import "Helper.h"
#import "Constants.h"

#define HALL_COUNT 6

@interface Board : CCNode {
    b2World* world_;
    
    CGPoint halls_[6];
    
    int countBallBlue;
    int countBallRed;
    CCLabelTTF *lbMoveUser;
    
    CCSprite *b1;
    CCSprite *b2;
    CCSprite *b3;
    
    CCSprite *br1;
    CCSprite *br2;
    CCSprite *br3;
    
    int currentBlueMark;
    int currentRedMark;
    int moveFirst;
    
    CCLabelTTF *lbWinUser;
    BOOL redHadShoot;
}

@property (nonatomic,readwrite) int countBallBlue;
@property (nonatomic,readwrite) int countBallRed;

@property (nonatomic,retain) CCLabelTTF *lbMoveUser;
@property (nonatomic,readwrite) BOOL redHadShoot;

+(id) setupBoradWithWorld:(b2World*)world;
-(BOOL)isInHall:(CGPoint)pos;
-(void)resetBalls;
-(b2Body *) getCurrentBodyByTag:(int) tag;
-(b2World *) getWorld;

-(void) doMarkGame:(int) markType;
-(void) resetAllBall;
-(void) autoRedShoot;

@end
